using System;
using Microsoft.SPOT;

namespace Microsoft.Xna.Framework
{
    public struct Point
    {
        private static Point zero = new Point(0,0);

        public float X;
        public float Y;

        public static Point Zero
        {
            get { return zero; }
        }

        public Point(float x, float y)
        {
            this.X = x;
            this.Y = y;
        }

        public bool Equals(Point value)
        {
            return value.X == this.X && value.Y == this.Y;
        }

        public override bool Equals(object obj)
        {
            if (obj is Point)
            {
                return Equals((Point)obj);
            }
            return false;
        }

        public override int GetHashCode()
        {
            return this.X.GetHashCode() + this.Y.GetHashCode();
        }

        public static bool operator ==(Point a, Point b)
        {
            return (a.X == b.X) && (a.Y == b.Y);
        }

        public static bool operator !=(Point a, Point b)
        {
            return (a.X != b.X) || (a.Y != b.Y);
        }

        public override string ToString()
        {
            return string.Concat("{X:", X.ToString(), " Y:", Y.ToString(), "}");
        }
    }
}
